home *** CD-ROM | disk | FTP | other *** search
- package ui
- {
- import flash.display.MovieClip;
-
- [Embed(source="/_assets/assets.swf", symbol="ui.SplashScreen")]
- public class SplashScreen extends MovieClip
- {
-
-
- public var _bg:MovieClip;
-
- private var _frameSpeed:Number = 0;
-
- public var _btn_playGame:MovieClip;
-
- public var _release_date:MovieClip;
-
- public var _ben:MovieClip;
-
- private var _retracted:Boolean = false;
-
- public function SplashScreen()
- {
- _frameSpeed = 0;
- _retracted = false;
- super();
- trace("SplashScreen con");
- addEventListener("enterFrame",onSplashScreenEnterFrame);
- }
-
- public function retract() : *
- {
- _frameSpeed = 1;
- }
-
- public function showElements() : *
- {
- _frameSpeed = -1;
- }
-
- private function onSplashScreenEnterFrame(event:*) : *
- {
- stop();
- this.gotoAndStop(this.currentFrame + _frameSpeed);
- if(this.currentFrame >= this.totalFrames - 1)
- {
- _frameSpeed = 0;
- _retracted = true;
- }
- else
- {
- _retracted = false;
- }
- if(this.currentFrame <= 1)
- {
- _frameSpeed = 0;
- }
- if(_frameSpeed < 0 || this.currentFrame <= 1)
- {
- _bg.alpha += (1 - _bg.alpha) * 0.25;
- _bg.visible = true;
- }
- if(_frameSpeed > 0)
- {
- _bg.alpha += (0 - _bg.alpha) * 0.25;
- if(_bg.alpha < 0.02)
- {
- _bg.visible = false;
- }
- }
- }
-
- public function get Retracted() : Boolean
- {
- return _retracted;
- }
-
- public function retractInstant() : *
- {
- this.gotoAndStop(this.totalFrames - 1);
- _frameSpeed = 0;
- _retracted = true;
- _bg.alpha = 0;
- _bg.visible = false;
- }
- }
- }
-